package com.bupt.vueblog.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author 谭继好
 * @Description 修改数据库表时传递的对象
 * 如更新评论的具体评论内容和简要博客表的标题部分
 * 根据标题模糊查询时的参数传递也使用此类。模糊查询用户收藏的以及点赞的博客
 * @date 2024-04-09 14:14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DetailInfoDTO {

    private Integer id;
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    public DetailInfoDTO(Integer id, String content) {
        this.id = id;
        this.content = content;
    }
}
